#include "customwebpage.h"

CustomWebPage::CustomWebPage(QObject *parent) :
	QWebPage(parent)
{
}

QString CustomWebPage::userAgentForUrl(const QUrl &url) const
{
	Q_UNUSED(url);
	return QWebPage::userAgentForUrl(url);
	//return QString("Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.6");
}

QWebPage *CustomWebPage::createWindow(QWebPage::WebWindowType)
{
	// this basically forces popups to open in the same window instead of a new one
	// useful for some stupid websites which open PDF links using target="_blank",
	// but might break others
	return this;
}
